#ifndef __IMAGE_H__
#define __IMAGE_H__

typedef struct image
{
    unsigned int width;
    unsigned int height;
    int depth;
    size_t rgb_len;
    size_t rgb_buf_len;
    void *rgb;
} image_t;

int write_bytes_to_file(const char *filename, void *bytes, size_t bytes_len);
int png_to_jpeg_mem(image_t *image, void *img_bytes, size_t *size, const char *filename);
int is_pic_png(const char *filename);

#endif

